package io.bdmc.modules.bss.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.bdmc.common.utils.MyPage;
import io.bdmc.common.utils.PageUtils;
import io.bdmc.common.utils.R;
import io.bdmc.modules.bss.entity.SmkDev;
import io.bdmc.modules.bss.mapper.SmkDevMapper;
import io.bdmc.modules.bss.service.ISmkDevService;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;


/**
 * <p>
 * 设备表 前端控制器
 * </p>
 *
 * @author hl
 * @since 2018-12-26
 */
@RestController
@RequestMapping("/bss/dev")
public class SmkDevController {
    


    @Autowired
    private ISmkDevService devSvs;

	@RequestMapping("/list")
	//@RequiresPermissions("sys:user:list")
	public R list(){
		//查询列表数据
        MyPage<SmkDev> myPage = new MyPage<SmkDev>(1, 5);
        MyPage<SmkDev> map = devSvs.mySelectPage(myPage, "NB");
		return R.ok().put("data", map);
    }
    
    @RequestMapping("/info")
    public R info(){
		//查询列表数据
        MyPage<SmkDev> myPage = new MyPage<SmkDev>(1, 5);
        
        
        SmkDev dev = devSvs.getOne(new QueryWrapper<SmkDev>().eq("dev_id", 2L));
		return R.ok().put("data", dev);
	}
}
